/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.myprojectwork.model;

import de.myprojectwork.model.dto.ActivityCategory;
import de.myprojectwork.model.dto.Configuration;
import de.myprojectwork.model.dto.HistoryActivity;
import de.myprojectwork.model.dto.Link;
import de.myprojectwork.model.dto.Project;
import de.myprojectwork.model.dto.Radar;
import de.myprojectwork.model.dto.Tag;
import de.myprojectwork.model.dto.Todo;

/**
 * Beinhaltet die Namen aller Tabellen und deren Spalten.
 * 
 * @author Chris Holdschuh
 */
public enum Table {
    
    ACTIVITY_CATEGORY           (1, "ACTIVITYCATEGORY", ActivityCategory.class),
    CONFIGURATION               (2, "CONFIGURATION", Configuration.class), 
    HISTORY_ACTIVITY            (3, "HISTORYACTIVITY", HistoryActivity.class),
    LINK                        (4, "LINK", Link.class),
    PROJECT                     (5, "PROJECT", Project.class),
    RADAR                       (6, "RADAR", Radar.class),
    TAG                         (7, "TAG", Tag.class),
    TODO                        (8, "TODO", Todo.class);
    
    private int index;
    private String tableName;
    private Class clazz;

    private Table(int index, String tableName, Class clazz) {
        this.index = index;
        this.tableName = tableName;
        this.clazz = clazz;
    }
    
    public int index() {
        return index;
    }
    
    public String tableName() {
        return tableName;
    }
    
    public Class clazz() {
        return clazz;
    }

    @Override
    public String toString() {
        return tableName;
    }
}
